﻿<div class="wrap white">
    <div class="container">
        <form method="post" class="form-signin" action="@PostUrl" @ref="LoginForm">
            <h2 class="form-signin-heading">@Title</h2>
            <div class="@ClassString">
                @if (AllowMobile)
                {
                    <div class="login-sms">
                        <SMSLogin />
                    </div>
                }
                <div class="login-up">
                    <UserLogin />
                </div>
                <div class="d-flex justify-content-between align-items-center mt-3">
                    <Checkbox @bind-Value="RememberPassword" Color="Color.Primary" ShowAfterLabel="true" DisplayText="记住密码自动登录" OnValueChanged="OnRememberPassword" />
                    <Block Condition="AllowMobile">
                        <SwitchButton @bind-ToggleState="UseMobileLogin" OnClick="OnClickSwitchButton" OffText="短信验证登录" OnText="用户密码登录" />
                    </Block>
                </div>
                <button class="btn btn-login btn-lg btn-block mt-3" data-bs-toggle="tooltip" title="不填写密码默认使用 Gitee 认证">登 录</button>
                <div class="d-flex justify-content-between mt-3">
                    <LinkButton Text="申请账号" OnClick="OnSignUp" />
                    <LinkButton Text="忘记密码" OnClick="OnForgotPassword" />
                </div>
                <Block Condition="AllowOAuth">
                    <Divider Text="其他方式登录" />
                    <div class="login-list">
                        <LinkButton Url="Account/Gitee" Title="使用 Gitee 帐号登录" ImageUrl="images/gitee.svg" />
                        <LinkButton Url="Account/Gitee" Title="使用 GitHub 帐号登录" ImageUrl="images/git.svg" />
                        <LinkButton Url="#" Title="微信-暂未实现" ImageUrl="images/weixin-2.svg" />
                        <LinkButton Url="Account/Tencent" Title="使用 QQ 账号登录" ImageUrl="images/qq.svg" />
                        <LinkButton Url="Account/Alipay" Title="使用支付宝账号登录" ImageUrl="images/zhifubao.svg" />
                    </div>
                </Block>
            </div>
        </form>
    </div>
</div>
